<html xmlns="http://www.w3.org/1999/xhtml"  
      xmlns:h="http://java.sun.com/jsf/html"  
      xmlns:f="http://java.sun.com/jsf/core"  
      xmlns:p="http://primefaces.org/ui" 
      xmlns:ui="http://java.sun.com/jsf/facelets">

    <h:head>
        <title>Retaguarda</title>
        <link rel="stylesheet" type="text/css" href="#{facesContext.externalContext.requestContextPath}/css/estilo.css"/> 
    </h:head>
    <h:body>
        <f:view>
            <p:layout fullPage="true">
                <p:layoutUnit position="north" size="200" header="Login de acesso" resizable="false" closable="false" collapsible="false">
                    <!--                    <p:graphicImage value="images/login.png" />-->
                    <h:form style="text-align: center; font-size: 18px; color: blue; margin: 50px 0px 0px 0px;">
                        <h:outputText value="Retaguarda" />
                    </h:form>
                    <h:form style="text-align: center;">
                        <p:commandButton value="Entre em contato" onclick="dlg.show()" image="ui-icon-mail-closed"/>
                    </h:form>
                </p:layoutUnit>

                <p:layoutUnit position="center">
                    <h:form id="loginForm">
                        <p:messages id="mgs"/>
                        <h:panelGrid columns="2" cellpadding="2" style="margin:50px 0px 0px 40%" id="panel">
                            <h:outputText value="Usuario"/>
                            <p:inputText required="true" value="${loginBean.usuario}" requiredMessage="Informe o nome do usuario" id="usuario">
                                <p:focus/>
                            </p:inputText>
                            <h:outputText value="Senha"/>
                            <p:password value="${loginBean.senha}" feedback="false" id="senha" required="true" requiredMessage="Informe sua senha!!"/>
                            <p:commandButton value="Entrar" update="panel,mgs" action="${loginBean.entrar()}" ajax="false" />
                            <p:commandButton value="Cancelar" type="reset"/>
                        </h:panelGrid>
                    </h:form>
                </p:layoutUnit>
            </p:layout>
            <!--    para envio de email        -->
            <p:dialog id="dialog" header="Entre em contato" widgetVar="dlg" modal="true" resizable="false" >  
                <ui:include src="_mail.xhtml"/>
                <p:ajaxStatus onstart="statusDialog.show();" onsuccess="statusDialog.hide();"/>  
            </p:dialog>
            <p:dialog modal="true" widgetVar="statusDialog" header="Aguarde...."  resizable="false"  
                      draggable="false" closable="false">  
                <p:graphicImage value="#{facesContext.externalContext.requestContextPath}/images/processando.gif" />  
            </p:dialog> 
        </f:view>
    </h:body>
</html>